In a flow based architecture, an application uses a worker dispatcher model where requests can be handled by a dispatcher before being passed to one or more process nodes to process a worker thread.
FIG. 1A is a prior art schematic representation of a work dispatcher system 10. The work dispatcher system 10 includes: a client 100, a work dispatcher server 102, and work dispatcher nodes 150A, 150B . . . 150N. Client 100 may send a message (e.g., a hypertext protocol request for a Web page) to work dispatcher server 102. Work dispatcher server 102 is configured to send the message to one or more work dispatcher nodes (150A, 150B, . . . 150N) for processing. The first node (150A) that the message is sent to is a start node. The last node (150N) the message ends up at is a reply node and may send a message reply (e.g., a Web page or component) to client 100. Each work dispatcher node sends statistics back to work dispatcher server 102 about respective processing performed at the node and, in particular, the start time and finish time of the message at each work dispatcher node.
Shortly after a node receives a message from the work dispatcher server 102, a dispatcher timeout may expire, resulting in the work dispatcher dispatcher 102 closing the connection with the nodes and returning a timeout to the client 100. Since the nodes have no way of detecting the dispatcher timeout, the nodes will continue processing the request until the reply node 150N tries to send a reply, which will fail, since the work dispatcher server 102 has already closed the connection. There are two main issues that this current approach has: time and resource is pointlessly spent processing the message after the dispatcher timeout has occurred; and exception handling is expensive and when the reply node 150 N is reached, a connection error is required. Since the dispatcher timeout generally occurs under high load, this expensive error handling can exasperate the issue by slowing down the rate at which messages are picked up and is therefore more likely to contribute to increasing the occurrence of dispatcher timeout for future messages, thereby creating a snowball effect.